<script setup lang="tsx">
import { ref } from "vue";
import { RunJobFormProps } from "./utils/types";

const props = withDefaults(defineProps<RunJobFormProps>(), {
  formInline: () => ({
    appId: "",
    jobId: "",
    instanceParams: ""
  })
});

const ruleFormRef = ref();
const newFormInline = ref(props.formInline);

function getRef() {
  return ruleFormRef.value;
}

defineExpose({ getRef });
</script>

<template>
  <el-form ref="ruleFormRef" :model="newFormInline" label-width="160px">
    <el-form-item label="任务参数" prop="jobName">
      <el-input
        v-model="newFormInline.instanceParams"
        type="textarea"
        clearable
        placeholder="请输入任务参数"
      />
    </el-form-item>
  </el-form>
</template>
<style lang="scss" scoped>
.code {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.codeInput {
  width: 230px;
  height: 35px;
  line-height: 35px;
  background-color: #fff;
}
</style>
